package com.css.bjdt_core.executive.util;

import com.css.bjdt_core.cell.entity.Cell;

public class CalcExpParser extends ExpParser {
	
	private CalcExpParser(){
	}
	
	private static class SingletonHolder {  
        private static final CalcExpParser INSTANCE = new CalcExpParser();  
    }
	
	public static final CalcExpParser getInstance(){
		return SingletonHolder.INSTANCE;
	}
	
	@Override
	public void parseExp(Cell cell){	
		//先解析列指标,再解析行指标,最后解析单元格指标(后者覆盖前者)
		handleColExp(cell);			
		handleRowExp(cell);
		handleCellExp(cell);
	}

	@Override
	public void handleResult(Cell cell) {
		cell.setCellLevel(cell.getCalcExp().getOrder());
	}
}
